<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>QeePHP 快速入门</title>
<link href="css/base.css" rel="stylesheet" type="text/css">
</head>
<body>

<div id="page">


<div class="guide-section">

  <div class="guide-header">
    <span class="nav">
      <a href="http://qee13.com/app/?action=docs">文档索引</a>
      &raquo;
      <a href="index.html">QeePHP 快速入门</a>
      &raquo;
      <a href="node-development.html">开始开发</a>
      &raquo;
      创建控制器    </span>
  </div>

  <div class="guide-section-details formatted">
    
<h1>创建控制器</h1>

<p>新建文件 _code/controller/tasks.php，内容如下：</p>

<pre class="php code"><span class="kw2">class</span> Controller_Tasks <span
class="kw2">extends</span> Controller_Abstract
<span
class="br0">&#123;</span>
    <span class="kw2">function</span> actionIndex<span
class="br0">&#40;</span><span class="br0">&#41;</span>
    <span
class="br0">&#123;</span>
    <span class="br0">&#125;</span>
<span
class="br0">&#125;</span></pre>

<p>在浏览器键入 <a
href="http://localhost/app/index.php?controller=tasks">http://localhost/app/index.php?controller=tasks</a>，系统将会自动建立视图文件，保存在
_code/view/tasks/index.php</p>
$Id: development-controller.texy 2013-08-14 02:24:25Z Tim13 $
  </div>

  <div class="guide-footer">

    <table border="0" width="100%">
      <tr>
        <td align="left" width="200">
                    &laquo;
          <a href="node-development-configs.html">修改配置文件</a>
          
        </td>

        <td align="center">
          本章：<a href="node-development.html">开始开发</a>
          <br />
          <a href="index.html">返回索引页</a>
        </td>

        <td align="right" width="200">
                    <a href="node-development-model.html">创建模型</a> 
          &raquo;
                  </td>
      </tr>
    </table>

  </div>

</div>


</div>

</body>
</html>


